﻿namespace MyTRCP.Common.MyProtocol
{
    public class DevLinkStatusPayload : BitWalkableObj
    {
        public bool IsAudioConnected { get; set; }
        public bool IsCtrlConnected { get; set; }
        public DevLinkStatusPayload() { }
        public DevLinkStatusPayload(byte[] data) : base(data) { }
        public override BitWalker ReadFromBitWalker(BitWalker bw)
        {
            IsAudioConnected = bw.ReadBit();
            IsCtrlConnected = bw.ReadBit();
            return bw;
        }

        public override BitWalker WriteToBitWalker(BitWalker bw)
        {
            return bw.WriteBit(IsAudioConnected).WriteBit(IsCtrlConnected);
        }
    }
}